<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@page import="com.ufida.ebscg.comm.Constant"%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>招商银行供应商门户-采购创造价值_商务协同_商务应答_执行中项目_投标结果</title>
<link href="../css/style.css" rel="stylesheet" type="text/css" />
<link href="../css/style_add.css" rel="stylesheet" type="text/css" />
<link href="css/collcss.css" rel="stylesheet" type="text/css" />
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<script language="JavaScript" type="text/javascript" src="../calendar/WdatePicker.js"></script>
<script language="JavaScript" type="text/javascript" src="../javascript/caltimer.js"></script>
<script language="JavaScript" type="text/javascript" src="../javascript/ajaxdeal.js"></script>
</head>

<body style="width:610px">
<%if(Constant.CAOPEN){ %>
<OBJECT id="CertSignAtl"  height="0" hspace="0" width="0" align="center" classid="clsid:4FEA81CE-00EA-4FB2-850E-353C947B7A66" VIEWASTEXT>
</OBJECT>  
<%} %>
<div id="main">
<div id="right">

<input type="hidden" value="${resultinform.inform_mode}" id="inform_mode"/>
  <table width="610" border="0">
    <tr>
      <td align="right">投标结果：
      
      <span class="f-12-F60000">
      <logic:notEmpty name="resultinform">
      
      <logic:equal name="resultinform" property="inform_mode" value="1">
      	中标
      </logic:equal>
      
      <logic:equal name="resultinform" property="inform_mode" value="2">
      	未中标
      </logic:equal>
      
      </logic:notEmpty>
      </span>
      
      </td>
    </tr>
  </table>
  <table width="500" border="0"  cellspacing="1" bgcolor="#696969" >
    <tr>
      <td bgcolor="#FFFFFF" >
      
      <table width="640" border="0"   >
        <tr>
          <td height="50"  >${resultinform.inform_content}</td>
        </tr>
       
      </table>
      
      </td>
    </tr>
  </table>
  <!--
  <form action="open.do" method="post" name = "uploadfile" enctype="MULTIPART/FORM-DATA">
  
  <input type="hidden" name="pk_xy_proj_main" value="${pk_xy_proj_main}"/>
  <input type = "hidden" name = "type" value = "1"/>
  
  <p>&nbsp;</p>
  
  
  <table width="610" border="0" cellpadding="0" cellspacing="0" >
   <tr>
      <td height="26" align="left" class="f-13-b-2a6ca7" >保证金付款证明</td>
      <td align="center" >&nbsp;</td>
      <td align="center" >&nbsp;</td>
      <td align="center" >&nbsp;</td>
    </tr>
    <tr class="th_bj">
      <td width="121" height="28" align="center" class="f-12-b-ffffff"  >序</td>
      <td width="146" height="28" align="center"  ><span class="f-12-b-ffffff">文件名称</span></td>
      <td width="111" height="28" align="center"  ><span class="f-12-b-ffffff">说明</span></td>
      <td height="28" align="center" class="f-12-b-ffffff"  ><img src="../images/botton_add.jpg"  border="0" onclick = "addRow()"  style="cursor:hand"/></td>
    </tr>
  </table>
   <table width="610" border=0 id="fileuploadtable" cellpadding="0" cellspacing="0" >
  </table>
  
   <p>&nbsp;</p>
	 <table width="610" border="0" cellpadding="0" cellspacing="0" >
	   <tr>
	      <td height="26" align="left" class="f-13-b-2a6ca7" colspan='2'>已上传保证金付款证明</td>
	 
	    </tr>
	    
	    <tr class="th_bj">
	      <td width="10%"   height="28" align="center" class="f-12-b-ffffff"  >序</td>
	      <td width="90%"  height="28" align="center"><span class="f-12-b-ffffff">文件名称</span></td>
	    </tr>
	    
	    <logic:iterate id="att" name="atts">
	    <tr >
	      <td width="10%"   height="28" align="center"   >${att.index }</td>
	      <td width="90%"  height="28" align="center">${att.filename }</td>
	    </tr>
	    </logic:iterate>
	    <tr>
	      <td colspan="2" height="1" bgcolor="#7f98ae"></td>
	    </tr>
	  
	  </table>  
 
  
  <table width="610" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td height="26" colspan="4" class="f-12-F60000">&nbsp;</td>
    </tr>
    <tr>
      <td width="230" height="40">&nbsp;</td>
	      <logic:equal name="resultinform" property="inform_mode" value="1">
	      <td width="82"><img src="../images/botton_submit.jpg" width="60" height="20" border="0" style="cursor:hand" onclick="submitFile()"/></td>
	      </logic:equal>
      <td width="196">&nbsp;</td>
    </tr>
  </table>
  <p class="protext" id="div_content" name="div_content"><br/>
</p>
</form>
-->
  </div>
<TEXTAREA id="certtxt" name="certtxt" rows="17" cols="48"  style="display: none" >${cert}</TEXTAREA>
<script language="vbscript">
		sub upfileSign(fileobject,index)

			Dim strP7Env
			Dim strSignature
			Dim strCert
			Dim ret
            Dim filepath

            filepath = fileobject.value
			ret = 0 rem ret 必须赋初值

		   if IsNull(CertSignAtl) then
					Alert("请确认您是否有权限下载文件")
					return
			end if

			     	
			     CertSignAtl.P7EncryptAndSignFile ret,certtxt.value,filepath,strP7Env,strSignature
					
			     If ret = 0 Then
				       call ondatachange(fileobject,index,strSignature,strP7Env)
				  
			     ElseIf ret = 100 Then
				       deleteRow(index)
			     Else
				     Alert("加密文件出现问题！")
					deleteRow(index)
			     End If
           

		end sub

</script>

<script language="javascript">





//是否需要上传文件
var is_upload_att = '${resultinform.is_upload_att}';

var update_mode = '${update_mode}';

function submitFile()
{
	var inform_mode = document.getElementById("inform_mode").value;
	
	var dismill = '${dismill}';
	
	if(inform_mode == 1 && update_mode == '1' && dismill > 0)
	{
		document.uploadfile.submit();
	}else{
	
		showmess("你没有权限进行应答!");
	}

}
var rowindex = 0;
//向批量上传文件的列表中添加一行数据
function addRow()
{

	var inform_mode = document.getElementById("inform_mode").value;
		
	//if(inform_mode != 1 || is_upload_att != 'Y')
	if(inform_mode != 1)
	{
		return;
	}
     var root = document.getElementById("fileuploadtable")
     var row = root.insertRow();
     
     row.style.height = '26px';
     rowindex++;
     row.id = "row"+rowindex;
     var cell1 = row.insertCell();
     
     cell1.style.width='121px';
     cell1.align="center";
     cell1.innerText = root.rows.length;
     var cell2 = row.insertCell();
     
     cell2.align="center";
     
     cell2.style.width = '146px';
	
	  var cell4= row.insertCell();
     
      var eventHandle = "<%if(Constant.CAOPEN){ %>upfileSign(this,"+rowindex+")"<%}else{%>ondatachange(this,"+rowindex+")"<%}%>;
     var innercontent = "  <input type='file' name='inputfile"+rowindex+"' id='file"+rowindex+"' style='position:absolute;opacity:0;filter:alpha(opacity=0); width:20px; height:20px' onchange='"+eventHandle+"'  />  ";
     cell4.innerHTML = innercontent
     
     cell4.style.width = '111';
     var cell3 = row.insertCell();
     
     cell3.align="center";
     
     var img = "<input type='hidden' name = 'filecontent' id='filecontent"+rowindex+"'  /><input type='hidden' name='signfile' id='signfile"+rowindex+"'/><img src='../images/botton_upload-.jpg' id='img"+rowindex+"' style='cursor:hand' border=0 style='cursor:hand'  onmouseover='showfiledialog("+rowindex+")'/>&nbsp<img src='../images/botton_delete.jpg' style='cursor:hand' border=0 style='cursor:hand' onclick='deleteRow("+rowindex+")'/>";
     cell3.innerHTML = img;   
}







</script>
</body>
</html>
